<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="#{theme.template}">

<!-- Existe un componente 'identity' de Seam, que actúa como backing-bean de las etiquetas JSF -->
<ui:define name="body">

	<rich:panel>
		<f:facet name="header">Iniciar Sesion</f:facet>
		<h:form id="login">
            	<s:decorate>
            		<h:outputLabel for="username" value="Username" style="display:block"/>
            		<h:inputText id="username" value="#{credentials.username}"/>
            	</s:decorate>
				<s:decorate>
					<h:outputLabel for="password" value="Password" style="display:block"/>
					<h:inputText id="password" value="#{credentials.password}"/>
				</s:decorate>							
            	<div class="actions">
            		<h:commandButton value="Login" action="#{identity.login}"/>
        		</div>
    	</h:form>
	</rich:panel>
 </ui:define>
</ui:composition>
